﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/OneColumn.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="Quizz.Infrastructure" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Danh sách người dùng
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="mainContentPlaceHolder" runat="server">
<div id="list-wrapper">
    <div class="title">Danh sách người dùng</div>
    <hr class="h-line-dashed" />
    <div class="list-control">
        <div class="left">
            <form name="frm-search" method="post" action="javascript:void(0)">
                <input class="form-input" name="txt-search" type="text" id="txt-search" placeholder="Tìm theo email, tên hoặc điện thoại" style="width:250px;float:left;" />
                <input class="button-2" type="submit" value="Tìm" />
            </form>
        </div>
        <div class="right">
            <a class="link-ctrl-button" onclick="GetUserPage(_currentPage, _itemPerPage, _currentOrder);" href="javascript:void(0)" title="Tải lại dữ liệu"><img alt="Reload" src="/images/reload.png" /></a>
            <a class="link-ctrl-button" onclick="OpenAddUserForm();" href="javascript:void(0)" title="Thêm"><img alt="Thêm" src="/images/add.png" /></a>
            <a class="link-ctrl-button" onclick="ShowConfirmDeleteAll();" href="javascript:void(0)" title="Xóa mục đã chọn"><img alt="Xóa mục đã chọn" src="/images/delete.png" /></a>
        </div>
    </div>
    <div class="list-content" id="list-content">
        <div class="container">
            <table class="tbl-list">
                <thead>
                    <tr>
                        <th style="min-width:30px;">#</th>
                        <th style="min-width:150px;">Email</th>
                        <th style="min-width:120px;">Họ</th>
                        <th style="min-width:80px;">Tên</th>
                        <th style="min-width:100px;">Điện Thoại</th>
                        <th style="min-width:120px;">Ngày đăng ký</th>
                        <th style="min-width:100px;">Trạng thái</th>
                        <th style="min-width:100px;">Quyền</th>
                        <th style="min-width:100px;">*</th>
                    </tr>
                </thead>
                <tbody id="user-list-data">
                </tbody>
            </table>
        </div>
        <div class="overlay-loading" id="overlay-loading">
            <div class="overlay"></div>
            <img class="loading" alt="loading..." src="/images/loading.gif" />
        </div>
        <div class="overlay-loading" id="overlay-loading">
            <div class="overlay"></div>
            <img class="loading" alt="loading..." src="/images/loading.gif" />
        </div>
    </div>
    <div class="list-sumary">
        <span class="count" id="user-count">Tổng : 0</span>
    </div>
    <div class="list-pagination">
        <div class="pages" id="user-pages">
        </div>
    </div>
</div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="headerContentPlace" runat="server">
<link rel="Stylesheet" type="text/css" href="/Content/list_table.css" />
<script type="text/javascript" src="/Scripts/SHA256.js"></script>
<script type="text/javascript" src="/Scripts/UserManage.js"></script>

<script type="text/javascript">
var _currentPage = <%= ViewData[Constants.UserListCurrent] ?? 0 %>;
var _currentOrder = "<%= ViewData[Constants.UserListOrder] ?? "Email" %>";
var _currentKeyword = "<%= ViewData[Constants.UserListKeyWord] ?? string.Empty %>";
var _itemPerPage = 25;

$(document).ready(function(){
    GetUserPage(_currentPage, _itemPerPage, _currentOrder);
    SetupAddUserForm();
    SetupDeleteAllConfirm();
    SetupDeleteConfirm();
});
</script>

</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="otherResourcePlace" runat="server">
<% Html.RenderPartial("../UserControls/CreateUserForm"); %>
<div id="dialog-confirm-delete-all" title="Xóa ?">
	<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Bạn có chắc muốn xóa các mục đã chọn ?</p>
</div>
<div id="dialog-confirm-delete" title="Xóa ?">
	<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Bạn có chắc muốn xóa ?</p>
</div>
</asp:Content>
